package com.sunmnet.j2ee.entity.powerdb.designer;

import com.sunmnet.j2ee.entity.base.BaseAutoEntity;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

@javax.persistence.Entity
@Table(name = "pdm_version_oper_record")
@DynamicInsert(true)
@DynamicUpdate(true)
public class VersionOperRecord extends BaseAutoEntity implements Serializable {

    private static final long serialVersionUID = -1381677135492961881L;
    private short type;
    private int accountId;
    private String record;
    private String operationSql;
    private String result;
    private short jobStatus;
    private int projectId;
    private int moduleId;
    private int versionId;

    @Override
    public String toString() {
        return new ReflectionToStringBuilder(
                this,
                ToStringStyle.DEFAULT_STYLE)
                .toString();
    }

    @Column(name = "type")
    public short getType() {
        return type;
    }

    public void setType(short type) {
        this.type = type;
    }

    @Column(name = "account_id")
    public int getAccountId() {
        return accountId;
    }

    public void setAccountId(int accountId) {
        this.accountId = accountId;
    }

    @Column(name = "record")
    public String getRecord() {
        return record;
    }

    public void setRecord(String record) {
        this.record = record;
    }

    @Column(name = "operation_sql")
    public String getOperationSql() {
        return operationSql;
    }

    public void setOperationSql(String operationSql) {
        this.operationSql = operationSql;
    }

    @Column(name = "result")
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    @Column(name = "job_status")
    public short getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(short jobStatus) {
        this.jobStatus = jobStatus;
    }

    @Column(name = "project_id")
    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    @Column(name = "module_id")
    public int getModuleId() {
        return moduleId;
    }

    public void setModuleId(int moduleId) {
        this.moduleId = moduleId;
    }

    @Column(name = "version_id")
    public int getVersionId() {
        return versionId;
    }

    public void setVersionId(int versionId) {
        this.versionId = versionId;
    }
}
